package com.leigang.boot.redis.springbootredis.utils;

import java.util.HashMap;
import java.util.Map;

public class ResponseUtils {

    public static Map<String, Object> success(Object object){
        Map<String, Object> map = new HashMap<>();
        map.put("code",200);
        map.put("message","成功");
        map.put("data",object);
        return map;
    }


    public static Map<String, Object> error(Object object){
        Map<String, Object> map = new HashMap<>();
        map.put("code",500);
        map.put("message","失败");
        map.put("data",object);
        return map;
    }
}
